home *** CD-ROM | disk | FTP | other *** search
/ PCMania 56 / PCMania CD56_1.iso / abc.z / EVENTS.FRM < prev    next >
Text File  |  1996-12-16  |  4KB  |  142 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "Double-Click & Delete Events DEMO"
  6.    ClientHeight    =   3030
  7.    ClientLeft      =   1305
  8.    ClientTop       =   1485
  9.    ClientWidth     =   4815
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   3435
  21.    Icon            =   "EVENTS.frx":0000
  22.    Left            =   1245
  23.    LinkTopic       =   "Form1"
  24.    ScaleHeight     =   3030
  25.    ScaleWidth      =   4815
  26.    Top             =   1140
  27.    Width           =   4935
  28.    Begin VB.PictureBox Picture1 
  29.       Appearance      =   0  'Flat
  30.       BackColor       =   &H80000005&
  31.       BorderStyle     =   0  'None
  32.       ForeColor       =   &H80000008&
  33.       Height          =   495
  34.       Left            =   420
  35.       Picture         =   "EVENTS.frx":030A
  36.       ScaleHeight     =   495
  37.       ScaleWidth      =   495
  38.       TabIndex        =   3
  39.       Top             =   1530
  40.       Width           =   495
  41.    End
  42.    Begin AbcflowLib.ABC ABC1 
  43.       Height          =   615
  44.       Left            =   240
  45.       TabIndex        =   4
  46.       Top             =   2280
  47.       Width           =   615
  48.       _version        =   65536
  49.       _extentx        =   1085
  50.       _extenty        =   1085
  51.       _stockprops     =   1
  52.    End
  53.    Begin VB.Label Label3 
  54.       Appearance      =   0  'Flat
  55.       BackColor       =   &H80000005&
  56.       Caption         =   "(c) Micrografx Inc., 1996. All Rights Reserved."
  57.       ForeColor       =   &H80000008&
  58.       Height          =   375
  59.       Left            =   1050
  60.       TabIndex        =   0
  61.       Top             =   1605
  62.       Width           =   3210
  63.    End
  64.    Begin VB.Label Label6 
  65.       Appearance      =   0  'Flat
  66.       BackColor       =   &H80000005&
  67.       Caption         =   $"EVENTS.frx":0614
  68.       ForeColor       =   &H80000008&
  69.       Height          =   1395
  70.       Left            =   435
  71.       TabIndex        =   2
  72.       Top             =   75
  73.       Width           =   3795
  74.    End
  75.    Begin VB.Label Label2 
  76.       Appearance      =   0  'Flat
  77.       BackColor       =   &H80000005&
  78.       Caption         =   "<---- Double-click on this custom OCX in VB 4.0 edit mode to see the event handling code."
  79.       ForeColor       =   &H80000008&
  80.       Height          =   855
  81.       Left            =   915
  82.       TabIndex        =   1
  83.       Top             =   2265
  84.       Visible         =   0   'False
  85.       Width           =   3015
  86.    End
  87. End
  88. Attribute VB_Name = "Form1"
  89. Attribute VB_Creatable = False
  90. Attribute VB_Exposed = False
  91. Private Sub ABC1_AppQuitNOTIFY()
  92.     End
  93. End Sub
  94.  
  95. Private Sub ABC1_DeleteSUBCLASS(ByVal Chart As Object,  Override As Boolean)
  96.     Dim ABCObj As Object
  97.     Dim SelectedObjs As Object
  98.  
  99.     Set SelectedObjs = Chart.Objects
  100.     Do
  101.         Set ABCObj = SelectedObjs.ItemFromSelection
  102.         ABCObj.Color = ABC1.App.GRAY
  103.         ABCObj.Shape.Fillpattern = 1
  104.     Loop While ABCObj.Valid
  105.  
  106.     Rem If you do not want the override the
  107.     Rem regular ABC ProcessAnalyser delete behavior,
  108.     Rem set the line below to False
  109.     ABC1.Override = True
  110.  
  111. End Sub
  112.  
  113. Private Sub ABC1_DoubleClickSUBCLASS(ByVal Object As Object, ByVal Chart As Object,  Override As Boolean)
  114.     Dim ABCObj As Object
  115.     Set ABCObj = Object
  116.  
  117.     ABCObj.Shape.FillColor = ABC1.App.RED
  118.     ABCObj.Shape.BorderWidth = 3
  119.     ABCObj.Text = "You double-clicked on me!"
  120.     ABCObj.Shape.FitShapeToText
  121.  
  122.     Rem If you do not want the override the
  123.     Rem regular ABC ProcessAnalyser linking behavior,
  124.     Rem set the line below to False
  125.     ABC1.Override = True
  126. End Sub
  127.  
  128. Private Sub Form_Load()
  129.     Dim ABCApp As Object
  130.  
  131.     Set ABCApp = CreateObject("ABCFlow.application")
  132.     ABCApp.Visible = True
  133.  
  134.     ABCApp.RegisterEvent ABC1, Form1.Caption, "DoubleClickSUBCLASS"
  135.     ABCApp.RegisterEvent ABC1, Form1.Caption, "DeleteSUBCLASS"
  136.     
  137.     ' Get the ABC Quit event so the Menu
  138.     ' sample can unload when ABC Quits
  139.     ABCApp.RegisterEvent ABC1, Form1.Caption, "AppQuitNOTIFY"
  140. End Sub
  141.  
  142.